Okay, let's try to cover some ground today.
We didn't finish with that last week, so I'll recap this a little bit and then we go a little
bit into debugging and what we can do to find actual problems with your code and as much
as we can, starting with object-oriented programming.
I have two announcements I've been asked to communicate again.
Plagiarism is not allowed.
Do you all know what plagiarism is?
You take code, an answer from somebody else, copy it and then paste it as your own answer.
That is not allowed.
If you do that, that's a warning now, but if you do that, we'll drop you from the course.
Okay, I hope this is clear.
We had a few cases during the last exercise submission, so don't.
Yes, feel free to discuss solutions with your peers, but make your own solution, please.
The other announcement I have is, you can hear about the exam in 19 February 2024 in
Stuttgart-Nikseien.
This is not the same schudorn as you currently use it.
This is an instance of schudorn that is specifically designed for exams.
So what you need to do on this day is to find a quiet space for a reasonably good internet
connection, library at home, wherever, where you can be alone.
It's important that you're alone, because we observe you through a Zoom meeting.
Then you can click through the exam, submit your solutions, and that will be, it should
be well doable within two hours.
There's a mock exam on schudorn if you want to click through.
That's pretty similar to what you experience on the day, except that schudorn exam is not
the same schudorn, okay?
So you need to make sure that you can access the system.
If you're registered for the exam, you get instructions and everything via email, but
you need to make sure that you can access schudorn exam, be alone on the day, and have
a reasonably good internet connection.
Okay, so recursion, as you might remember from last time, is the magic way of being
able in many, many programming languages to call functions with themselves.
So you define that function, and then within that function body, you can define, you can
call the same function.
Yeah, that's a neat trick in programming behind, well, behind the scenes, you're programming
either compiler, processor, or the interpreter in Python, but has some mechanisms to actually
make this work.
Well, why do we want to do this?
Basically, divide and conquer.
Any problem we can divide into smaller subproblems where we can find a base space, can be
taken by this, many problems you can also solve with just iterative loops, all right,
it's the same.
Sometimes recursion is more intuitive, sometimes the conversion is more efficient, sometimes
recursion is the only option you have, because you might not know how long you're going to
go, and also it's usually a clean way of programming.
So that is an example we discussed last time.
This is just what multiplication means.
Multiplication is addition of the same value, right?
We can break this down into a smaller problem like this.
We can also say that a times b is not a plus a plus a plus a plus, it's a plus, and then
the same thing again, times b minus one.
Presenters
Zugänglich über
Offener Zugang
Dauer
01:28:31 Min
Aufnahmedatum
2023-11-20
Hochgeladen am
2023-11-20 13:26:05
Sprache
en-US
recusion, dictionaries, debugging, start of OOP